<?php
  INCLUDE "F_CONX.php";
  $V_ANIO = $HTTP_POST_VARS["V_ANIO"];
  $V_MES  = $HTTP_POST_VARS["V_MES"];
  $V_EDO  = $HTTP_POST_VARS["V_EDO"];
  $V_ZONA = $HTTP_POST_VARS["V_ZONA"];
  $V_OUT="";
  $V_OUT.="<HTML>";
  $V_OUT.="<HEAD>";
  $V_OUT.="<TITLE></TITLE>";
  $V_OUT.="</HEAD>";
  $MS_SQL    = "SELECT * FROM TFAS";
  $MS_RESULT = MYSQL_QUERY($MS_SQL);
  $V_OUT.="<FORM NAME='FORMCAP' METHOD='POST' ACTION='S_UVP.php'>
           <TABLE WIDTH='400'>
           <TR><TD COLSPAN='4'>CAPTURA</TD></TR>
           <TR>
               <TD>TARIFA</TD>
               <TD>USUARIOS</TD>
               <TD>VENTAS</TD>
               <TD>PRODUCTOS</TD>
  	       </TR>";
  WHILE($A_TFAS = MYSQL_FETCH_ARRAY($MS_RESULT))
  {
     $V_OUT.="<TR>
                  <TD>$A_TFAS[0]</TD>
                  <TD><INPUT TYPE='TEXT' NAME='V_USU$A_TFAS[0]'></TD>
                  <TD><INPUT TYPE='TEXT' NAME='V_VTA$A_TFAS[0]'></TD>
                  <TD><INPUT TYPE='TEXT' NAME='V_PRO$A_TFAS[0]'></TD>
              </TR>";
  }
  $V_OUT.="<TR><TD COLSPAN='4'>
               <INPUT TYPE='HIDDEN' NAME='V_ANIO' VALUE='$V_ANIO'>
               <INPUT TYPE='HIDDEN' NAME='V_MES'  VALUE='$V_MES' >
               <INPUT TYPE='HIDDEN' NAME='V_EDO'  VALUE='$V_EDO' >
               <INPUT TYPE='HIDDEN' NAME='V_ZONA' VALUE='$V_ZONA'>
           </TD></TR>";
  $V_OUT.="<TR><TD COLSPAN='4'><INPUT TYPE='SUBMIT' NAME='BTN_ENVIO' VALUE='GUARDAR DATOS'></TD></TR>";
  $V_OUT.="</TABLE></FORM>";
  $V_OUT.="</BODY>";
  $V_OUT.="</HTML>";
  ECHO $V_OUT;
?>
